home *** CD-ROM | disk | FTP | other *** search
-
- overlay procedure pstat;
- var c:char;
- begin
- outkey(chr(12));
- with systat do begin
- print('New User Pass : '+boardpw);
- prompt('Board is : '); if closedsystem then print('Closed') else print('Open');
- print('Number Users : '+cstr(users));
- print('Number calls : '+cstr(callernum));
- print('Date : '+lastdate);
- print('Active today : '+cstr(activetoday));
- print('Calls today : '+cstr(callstoday));
- print('M posted today : '+cstr(msgposttoday));
- print('E sent today : '+cstr(emailtoday));
- print('F sent today : '+cstr(fbacktoday));
- print('U today : '+cstr(uptoday));
- prompt('Sysop : '); if sysop then print('Available')
- else print('NOT Available');
- print('F waiting : '+cstr(fw));
- end;
- nl;nl;print('Hit any key');
- getkey(c);
- end;
-
-
- overlay procedure uedit(usern:integer);
- var user,user1:userrec; c:char; r:restrictions; i,i1,x:integer; save:boolean; ii,is:str; f:file;
- mr:mailrec;
- begin
- reset(uf);
- repeat
- seek(uf,usern); read(uf,user); save:=false;
- if (usern=usernum) and useron then user:=thisuser;
- with user do begin
- cls;
- prompt('Name : '+name+' #'+cstr(usern));
- if deleted then print(' XXXXXXXXXXXXXXX') else nl;
- print('Real name : '+realname);
- print('Phone number : '+ph);
- writeln('Password : '+pw);
- print('Last on : '+laston);
- print('Messages : P='+cstr(msgpost)+' E='+cstr(emailsent)+' F='+
- cstr(feedback)+' W='+cstr(waiting));
- prompt('Logged on : '+cstr(loggedon)); if laston=date then
- prompt(' '+cstr(ontoday)) else prompt(' 0');
- print(' I'+cstr(illegal));
- print('Sec Lev : '+cstr(sl));
- if sl=99 then print('SBN : '+cstr(sbn));
- print('Computer type: '+comptyp[comptype]);
- print('DL Sec Lev : '+cstr(dsl)+' - '+cstr(uploads)+'-'+cstr(uk)+
- ' / '+cstr(downloads)+'-'+cstr(dk));
- prompt('Restrictions : ');
- for r:=rlogon to rmsg do
- if r in ac then prompt(copy('LCVBA*PEKM',ORD(R)+1,1)) else prompt(' '); nl;
- prompt('Board access : ');
- for c:='A' to 'G' do
- if c in ar then outkey(c) else outkey(' '); nl; nl;
- if nomail in option then print('Mailbox closed.');
- if alert in option then print('Alert set.');
- end;
- prompt('Option :'); onek(c,'QSA[]UBDRNPELT?'); c:=upcase(c);
- case c of
- 'B': begin
- prompt('Which board? '); onek(c,'ABCDEFG'); c:=upcase(c);
- if c in ['A'..'G'] then if c in user.ar then user.ar:=user.ar-[c]
- else user.ar:=user.ar+[c];
- if c in ['A'..'G'] then save:=true;
- end;
- 'U': begin
- close(uf); prompt('Enter user: ');
- finduser(i); if i>0 then usern:=i; reset(uf);
- end;
- '[': begin
- usern:=usern-1; if usern=0 then usern:=filesize(uf)-1;
- end;
- ']': begin
- usern:=usern+1; if usern=filesize(uf) then usern:=1;
- end;
- 'A': begin save:=true;
- print('LCVBA*PEKM');
- nl;prompt('Which? ');; onek(c,'LCVBA*PEKM'+#13); c:=upcase(c); print(c); nl;
- if c<>#13 then acch(c,user); save:=true;
- end;
- 'S': begin prompt('Enter new SL: '); input(ii,4);
- if ii<>'' then begin
- i:=value(ii); save:=true; if i<>255 then user.sl:=i;
- if user.sl=99 then begin
- prompt('Which board #? '); input(ii,2);
- user.sbn:=value(ii); save:=true;
- end;
- end;
- end;
- 'T': begin prompt('Enter new DSL: '); input(ii,4);
- if ii<>'' then user.dsl:=value(ii); save:=true;
- end;
- 'D': begin prompt('Delete? '); if yn and (not user.deleted) then begin
- save:=true; user.deleted:=true; dsr(user.name);
- i:=usernum; usernum:=usern; rsm; usernum:=i;
- begin
- user.waiting:=0; reset(mailfile); for i:=0 to filesize(mailfile)-1 do begin
- seek(mailfile,i); read(mailfile,mr); i1:=0;
- if (mr.destin=usern) or (abs(mr.from)=usern) then begin
- if abs(mr.from)=usern then i1:=mr.destin;
- assign(f,filename(mr.msg)); {$I-} erase(f); {$I+} x:=ioresult;
- mr.destin:=-1; mr.from:=0; seek(mailfile,i); write(mailfile,mr);
- end;
- if (i1>0) and (i1<filesize(uf)) then begin
- seek(uf,i1); read(uf,user1); user1.waiting:=user1.waiting-1;
- seek(uf,i1); write(uf,user1); if i1=1 then fw:=fw-1;
- end;
- end;
- end;
- end;end;
- 'R': if user.deleted then begin save:=true; isr(user.name,usern); user.deleted:=false; end;
- 'N': if user.deleted then print('Can''t rename deleted users.') else
- begin nl;prompt('Enter new name or <CR>: '); input(ii,25);
- if ii<>'' then begin
- dsr(user.name); isr(ii,usern); user.name:=ii; save:=true;
- if usern=usernum then thisuser.name:=ii;
- end;
- end;
- 'P': begin prompt('New phone number: '); input(ii,12); if ii<>'' then
- begin user.ph:=ii; save:=true; end;
- end;
- 'E': begin prompt('New Real Name: '); inputl(ii,14); if ii<>'' then
- begin user.realname:=ii; save:=true; end;
- end;
- 'L': begin
- if alert in user.option then
- user.option:=user.option-[alert] else
- user.option:=user.option+[alert];
- save:=true;
- end;
- '?': begin
- print('S - change seclev A - change access');
- print('[ - down one user ] - up one user');
- print('U - go to user B - board access');
- print('D - delete user R - restore user');
- print('N - change name P - change phone number');
- print('E - change real name Q - quit');
- print('L - aLert for user T - Transfer SL');
- prompt('(-*-)'); getkey(c); skey(c);
- end;
- end;
- if save then begin seek(uf,usern); write(uf,user); if usern=usernum then thisuser:=user; end;
- until (c='Q') or hangup;
- close(uf);
- end;
-
- overlay procedure initvotes;
- var vdata:file of vdatar; cv,tv,ii:integer; i,i1,i2:str; vd:vdatar; t1,tf:boolean;
- u1:userrec;
- begin
- begin
- assign(vdata,'gfiles\voting.dat'); {$I-} reset(vdata); {$I+}
- if ioresult<>0 then begin
- rewrite(vdata); vd.question:='<< NO QUESTION >>'; vd.numa:=0;
- for cv:=0 to 8 do write(vdata,vd);
- end;
- repeat
- cls;
- for cv:=1 to 9 do begin
- seek(vdata,cv-1); read(vdata,vd);
- print(cstr(cv)+': '+vd.question);
- end;
- prompt('Which? '); input(i,2);
- ii:=value(i); t1:=false;
- if (ii>0) and (ii<10) then begin
- cv:=1; t1:=true;
- print('Enter new question:'); prompt(':');
- inputl(vd.question,79);
- if vd.question='' then begin vd.numa:=0; vd.question:='<< NO QUESTION >>';
- end else begin
- vd.answ[0].ans:='No Comment';
- vd.answ[0].numres:=0;
- nl; print('Enter blank line for last answer,');
- print('max 9 answers, 25 chars/answer');
- tf:=false;
- repeat
- prompt(cstr(cv)+':'); inputl(vd.answ[cv].ans,25); vd.answ[cv].numres:=0;
- if vd.answ[cv].ans='' then begin
- tf:=true;
- if cv=1 then vd.question:='<< NO QUESTION >>'
- end else cv:=cv+1;
- until hangup or (cv=10) or tf;
- vd.numa:=cv-1;
- end;
- seek(vdata,ii-1); write(vdata,vd);
- vqu[ii]:= vd.numa<>0;
- reset(uf); for cv:=1 to filesize(uf)-1 do begin
- seek(uf,cv); read(uf,u1); u1.vote[ii]:=0; seek(uf,cv); write(uf,u1);
- end;
- close(uf);
- thisuser.vote[ii]:=0;
- end;
- until not t1;
- close(vdata);
- end;
- end;
-
- overlay procedure boardedit;
- var i1,i2,ii:integer; c:char; ij:str;
- begin
- prompt('PW? '); echo:=false; input(ij,8); echo:=true;
- if ij=systat.sysoppw then
- repeat
- cls;
- print('NN K Name Filename SL MaxM Password AR An');
- print('-- = ------------------------- ============ --- ==== ---------- == --');
- for ii:=1 to numboards do with boards[ii] do begin
- prompt(mn(ii,2)+' '+key+' '+mln(name,25)+' '+mln(filename,12)+' '+mn(sl,3)+' ');
- prompt(mn(maxmsgs,3)+' '+mln(pw,10)+' '); if ar='@' then prompt(' ') else prompt(ar+' ');
- case anonymous of
- yes:print('Y');
- no:print('N');
- forced:print('F');
- dearabby:print('DA');
- end;
- end;
- nl; prompt('D)elete, I)nsert, M)odify, Q)uit :'); onek(c,'QDIM');
- case c of
- 'D': begin
- prompt('Board number to delete? '); inu(ii);
- if (ii>0) and (ii<=numboards) then begin
- prompt(boards[ii].name+' Delete it? ');
- if yn then begin
- numboards:=numboards-1; for i1:=ii to numboards do
- boards[i1]:=boards[i1+1];
- rewrite(bf); for i1:=1 to numboards do write(bf,boards[i1]);
- close(bf); reset(uf); for i1:=1 to filesize(uf)-1 do begin
- seek(uf,i1);read(uf,user); for i2:=ii to numboards do begin
- user.qscn[i2]:=user.qscn[i2+1]; user.qscan[i2]:=user.qscan[i2+1];
- end;
- seek(uf,i1); write(uf,user);
- end; close(uf);
- end;
- end;
- end;
- 'M': begin
- prompt('Board number to edit? '); inu(ii);
- if (ii>0) and (ii<=numboards) then begin with boards[ii] do
- repeat
- cls;
- print(' Board : '+cstr(ii));
- print('1. Name : '+name);
- print('2. Filename : '+filename);
- print('3. Key : '+key);
- print('4. SL : '+cstr(sl));
- print('5. AR : '+ar);
- print('6. Password : "'+pw+'"');
- print('7. Max Mess : '+cstr(maxmsgs));
- prompt('8. Anonymous : '); case anonymous of
- yes:print('Yes');
- no:print('No');
- forced:print('Force');
- dearabby:print('Dear abby');
- end;
- nl; prompt('Which? '); onek(c,'12345678Q');
- case c of
- '1':begin prompt('New name? '); inputl(name,25); end;
- '2':begin prompt('New filename? '); input(filename,12); end;
- '3':begin prompt('New key? '); getkey(c); key:=c; nl;
- if not (key in ['"','#','%','&','(',')','+',',','-',
- '.',':',';','<','=','>']) then key:=' '; end;
- '4':begin prompt('New SL? '); ini(sl); end;
- '5':begin prompt('New AR? '); getkey(c); ar:=upcase(c);
- if (ar<'A') or (ar>'G') then ar:='@'; nl; end;
- '6':begin prompt('New PW? '); input(pw,10); end;
- '7':begin prompt('Max messages? '); ini(maxmsgs); end;
- '8':begin prompt('New ANST (Y,N,F,D) ? '); onek(c,'YNFD');
- case c of
- 'Y':anonymous:=yes;
- 'N':anonymous:=no;
- 'F':anonymous:=forced;
- 'D':anonymous:=dearabby;
- end;
- end;
- end;
- until (c='Q') or hangup;
- reset(bf); seek(bf,ii-1); write(bf,boards[ii]); close(bf); c:=' ';
- end;
- end;
- 'I': begin
- prompt('Board number to insert before? '); inu(ii);
- if (ii>0) and (ii<=numboards+1) and (numboards<19) then begin
- numboards:=numboards+1; for i1:=numboards downto ii do
- boards[i1]:=boards[i1-1];
- with boards[ii] do begin
- name:='NEW BOARD';
- filename:='newboard';
- sl:=30;
- maxmsgs:=50;
- pw:='';
- anonymous:=no;
- ar:='@';
- key:=' ';
- end;
- rewrite(bf); for i1:=1 to numboards do write(bf,boards[i1]);
- close(bf); reset(uf); for i1:=1 to filesize(uf)-1 do begin
- seek(uf,i1);read(uf,user); for i2:=numboards downto ii do begin
- user.qscn[i2]:=user.qscn[i2-1]; user.qscan[i2]:=user.qscan[i2-1];
- end;
- user.qscan[ii].number:=-32767; user.qscan[ii].ltr:='A'; user.qscn[ii]:=true;
- seek(uf,i1); write(uf,user);
- end; close(uf);
- end;
- end;
- end;
- until (c='Q') or hangup;
- end;
-
- overlay procedure mailr;
- var ii:integer; mr:mailrec; abort,a:boolean; c:char; u:userrec; is:str;
- begin
- {$I-} reset(mailfile); {$I+} c:=' ';
- if ioresult=0 then begin
- reset(uf);
- ii:=filesize(mailfile)-1; c:=' ';
- while (ii>=0) and (c<>'Q') do begin
- seek(mailfile,ii); read(mailfile,mr);
- if mr.destin<>-1 then begin
- repeat
- seek(uf,mr.destin); read(uf,u);
- print('To '+u.name+' #'+cstr(mr.destin)); a:=true;
- print('Title: '+mr.title);
- readmsg(mr.msg,a,next);
- prompt('R,D,Q,<space> : ');
- if next then c:=' ' else getkey(c); c:=upcase(c); print(c);
- if c='D' then begin
- close(uf); is:=rmail(ii); reset(uf);
- if usernum=mr.destin then thisuser.waiting:=thisuser.waiting-1;
- end;
- nl;nl;
- until (c<>'R');
- end;
- ii:=ii-1;
- end;
- close(mailfile);
- close(uf);
- end;
- end;
-
- overlay procedure changestuff;
- var i,i1:str; c:char; b1,b2:boolean;
-
- procedure po;
- begin
- clrscr;
- writeln('A. Sysop Password : "'+systat.sysoppw+'"');
- writeln('B. New User Password : "'+systat.boardpw+'"');
- write('C. System : ');
- if systat.closedsystem then writeln('Closed') else writeln('Open');
- writeln; writeln; writeln; writeln;
- end;
-
- begin
- write('PW? '); input(i,8);
- if i=systat.sysoppw then begin cls;
- po;
- repeat
- b1:=false;
- repeat
- gotoxy(1,8);
- write('Which (A-C,Q=Quit) ? ');
- clreol;
- read(kbd,c);
- c:=upcase(c);
- until c in ['A'..'C','Q'];
- case c of
- 'Q':b1:=true;
- 'B':begin
- writeln;
- write('New NewUser Password : ');
- input(i,8);
- writeln;
- writeln('NewUser Password: "'+i+'"');
- writeln;
- write('Is this what you want? ');
- if yn then systat.boardpw:=i;
- po;
- end;
- 'A':begin
- writeln;
- write('New Sysop Password : ');
- input(i,8);
- writeln;
- writeln('Sysop Password: "'+i+'"');
- writeln;
- write('Is this what you want? ');
- if yn then systat.sysoppw:=i;
- po;
- end;
- 'C':begin
- writeln;
- write('Do you want the system closed? ');
- b2:=yn;
- writeln;
- write('System: '); if b2 then writeln('Closed') else writeln('Open');
- writeln;
- write('Is this what you want? ');
- if yn then systat.closedsystem:=b2;
- po;
- end;
- end;
- until b1;
- end;
- end;
-
- overlay procedure dlboardedit;
- var ulf:file of ulrec;
- uboards:array[0..19] of ulrec;
- i1,ii,culb,maxulb:integer;
- c:char; done:boolean;
- ij:str;
- begin
- assign(ulf,'gfiles\uploads.dat');
- reset(ulf); maxulb:=-1;
- while not eof(ulf) do begin maxulb:=maxulb+1; read(ulf,uboards[maxulb]); end;
- close(ulf);
- prompt('PW? '); echo:=false; input(ij,8); echo:=true;
- if ij=systat.sysoppw then
- repeat
- cls; done:=false;
- print('NN Board Name Filename DSL MaxF Password');
- print('-- ========================= ------------ === ---- ========');
- for ii:=0 to maxulb do with uboards[ii] do
- print(mn(ii,2)+' '+mln(name,25)+' '+mln(filename,12)+' '+mn(dsl,3)+' '+mn(maxfiles,3)+' '+mln(password,10));
- nl; prompt('D)elete, I)nsert, M)odify, Q)uit :'); onek(c,'QDIM');
- case c of
- 'Q':done:=true;
- 'D':begin
- prompt('Directory number to delete? '); inu(ii);
- if (ii>0) and (ii<=maxulb) then begin
- prompt(uboards[ii].name+' Delete it? ');
- if yn then begin
- maxulb:=maxulb-1; for i1:=ii to maxulb do
- uboards[i1]:=uboards[i1+1];
- rewrite(ulf); for i1:=0 to maxulb do write(ulf,uboards[i1]);
- close(ulf);
- end;
- end;
- end;
- 'M': begin
- prompt('Directory number to edit? '); inu(ii); cls;
- if (ii>=0) and (ii<=maxulb) then with uboards[ii] do begin
- repeat
- cls; print(' Directory : '+cstr(ii));
- print('1. Name : '+name);
- print('2. Filename : '+filename);
- print('3. DSL : '+cstr(dsl));
- print('4. Password : "'+password+'"');
- print('5. Max files : '+cstr(maxfiles));
- nl; prompt('Which? '); onek(c,'Q12345');
- case c of
- '1':begin prompt('New name? '); inputl(name,25); end;
- '2':begin prompt('New filename? '); input(filename,12); end;
- '3':begin prompt('New DSL? '); ini(dsl); end;
- '4':begin prompt('New PW? '); input(password,10); end;
- '5':begin prompt('Max files? '); inu(maxfiles); end;
- end;
- until (c='Q') or hangup;
- reset(ulf); seek(ulf,ii); write(ulf,uboards[ii]); close(ulf); c:=' ';
- end;
- end;
- 'I': begin
- prompt('Board number to insert before? '); inu(ii);
- if (ii>0) and (ii<=maxulb+1) and (maxulb<19) then begin
- maxulb:=maxulb+1; for i1:=maxulb downto ii do
- uboards[i1]:=uboards[i1-1];
- with uboards[ii] do begin
- name:='NEW DIRECTORY';
- filename:='newdir';
- dsl:=0;
- maxfiles:=50;
- password:='';
- end;
- rewrite(ulf); for i1:=0 to maxulb do write(ulf,uboards[i1]);
- close(ulf);
- end;
- end;
- end;
- until done or hangup;
- end;
-
- overlay procedure init;
- var a,b,c:integer;
- vdf:file of vdatar;
- vd:vdatar;
- fi:text;
- i:str;
- fil:file of pnr;
- ns:pnr;
- f:file;
- ch1:char;
- begin
- if daynum(date)=0 then begin
- clrscr;
- writeln('You need to set the date & time first.');
- halt;
- end;
- comport:=comnum;
- maxspd:=maxbaud;
- iport; ldate:=daynum(date);
- ch:=false; lil:=0; thisuser.pagelen:=20; buf:=''; chatcall:=false;
- spd:=''; lastname:=''; ll:=''; cursor:=''; i:=''; chatr:='';
- assign(bf,'gfiles\boards.dat');
- assign(uf,'gfiles\user.lst');
- assign(sf,'gfiles\names.lst');
- assign(sysopf,'gfiles\sysop.log');
- assign(mailfile,'gfiles\email.dat');
- assign(systatf,'gfiles\status');
- reset(systatf); read(systatf,systat);close(systatf);
- assign(smf,'gfiles\shortmsg.dat');
- assign(cf,'gfiles\chat.msg'); cfo:=false;
- reset(sf); for a:=0 to systat.users do read(sf,srl[a]); close(sf);
- for a:=systat.users+1 to maxusers do begin srl[a].name:=''; srl[a].number:=0; end;
- hangup:=false;
- incom:=false; outcom:=false;
- echo:=true; doneday:=false;
- reset(bf);
- numboards:=filesize(bf);
- for t:=1 to numboards do
- read(bf,boards[t]);
- close(bf);
- assign(slf,'gfiles\seclev.dat'); reset(slf); for c:=0 to 255 do read(slf,seclev[c]);
- close(slf);
- reset(uf);
- if filesize(uf)>1 then begin seek(uf,1); read(uf,user); fw:=user.waiting;
- end else fw:=0;
- close(uf);
- assign(f,'gfiles\help.msg');
- for ch1:='0' to '^' do helpi[ch1]:=0;
- {$I-} reset(f,1); {$I+}
- if ioresult=0 then begin
- blockread(f,help[1],25000,a);
- close(f);
- b:=1;
- while (b<a) do begin
- if help[b]='|' then begin
- ch1:=help[b+1];
- if ch1 in ['0'..'^'] then begin
- c:=b;
- while (help[c]<>#10) and (abs(c-b)<80) do c:=c+1;
- c:=c+1;
- if c<a then helpi[ch1]:=c;
- end;
- end;
- b:=b+1;
- end;
- help[a+1]:='|';
- end;
- assign(vdf,'gfiles\voting.dat');
- {$I-} reset(vdf); {$I+}
- if ioresult=0 then begin
- for a:=1 to 9 do begin
- read(vdf,vd);
- vqu[a]:=vd.numa<>0;
- end;
- close(vdf);
- end else for a:=1 to 9 do vqu[a]:=false;
- assign(fi,'gfiles\trashcan.txt'); {$I-} reset(fi); {$I+}
- if ioresult<>0 then begin
- rewrite(fi); i:='FUCK'; writeln(fi,i); i:='SID VICIOUS'; writeln(fi,i);
- i:='SYSOP'; writeln(fi,i); i:='JEFF THE RIPPER'; writeln(fi,i);
- end;
- close(fi);
- assign(fil,'gfiles\numbers.trm');
- {$I-} reset(fil); {$I+}
- if ioresult<>0 then begin
- rewrite(fil);
- ns.name:='========================================';
- ns.number:='- --- --- ----';
- ns.hs:=true;
- for c:=1 to 9 do write(fil,ns);
- end;
- close(fil);
- end;
-
- overlay procedure movemsg(var pl,cn:integer);
- var mr,mr1:messagerec; i:str; c1,c2,c3,ob:integer; done:boolean;
-
- function gtr(mr,mr1:messages):boolean;
- begin
- if mr.ext>mr1.ext then gtr:=true else
- if mr.ltr>mr1.ltr then gtr:=true else
- if (mr.ltr=mr1.ltr) and (mr.number>mr1.number) then
- gtr:=true
- else gtr:=false;
- end;
-
- begin
- nl; nl; if (cn>0) and (cn<=pl) then begin
- print('Move message'); c1:=0; done:=false;
- repeat
- prompt('To which board (1-'+cstr(numboards)+') ?=list, Q=Quit :');
- input(i,3);
- if (i='') or (i='Q') then done:=true;
- if i='?' then begin
- nl;
- for c2:=1 to numboards do
- print(cstr(c2)+': '+boards[c2].name);
- nl;
- end;
- c1:=value(i);
- if (c1>0) and (c1<=numboards) then done:=true;
- until done;
- if (c1>0) and (c1<=numboards) then begin
- seek(mf,cn); read(mf,mr); pl:=pl-1;
- for c2:=cn+1 to pl+1 do begin
- seek(mf,c2);read(mf,mr1); seek(mf,c2-1); write(mf,mr1);
- end;
- seek(mf,0); mr1.message.number:=pl; write(mf,mr1);
- close(mf);
- ob:=board;
- board:=c1;
- iscan(pl);
- if pl>=boards[board].maxmsgs then deletem(pl,1);
- c1:=pl;
- if c1>0 then begin seek(mf,c1); read(mf,mr1); end;
- while gtr(mr1.message,mr.message) and (c1>0) do begin
- c1:=c1-1;
- if c1>0 then begin seek(mf,c1); read(mf,mr1); end;
- end;
- c1:=c1+1;
- pl:=pl+1;
- for c2:=pl downto c1+1 do begin
- seek(mf,c2-1); read(mf,mr1); seek(mf,c2); write(mf,mr1);
- end;
- seek(mf,c1); write(mf,mr);
- mr.message.number:=pl; seek(mf,0); write(mf,mr);
- close(mf);
- board:=ob;
- iscan(pl);
- if cn>pl then cn:=pl;
- print('Moved.');
- end;
- end;
- end;